<?php $this->placeholder('onReady')->captureStart() ?>
﻿  $("#<?php echo $this->id_tablesorter?>").tablesorter();
<?php $this->placeholder('onReady')->captureEnd() ?>


<?=$this->msg($this->translate('En rojo diferencias mayores al %s%%* respecto mes anterior',$this->diff),'head',null,false)?>
<?=$this->msg($this->translate('K facturación , K imputación y Modalidad se ponen en rojo si son distintos, no aplica el % diff<br>Fila 1: Mes actual<br>Fila 2: Mes anterior'),'atencion',null,false)?>

<table id="<?= $this->id_tablesorter?>" width="100%" class="tablesorter">
<thead>
<tr>
    <th><?php echo $this->translate('Proyecto');?></th>
    <th><?php echo $this->translate('Consumo');?> kWh</th>
    <th><?php echo $this->translate('Potencia');?> kW</th>
    <th><?php echo $this->translate('K imputación');?></th>
    <th><?php echo $this->translate('Consumo Imputado');?> kWh</th>
    <th><?php echo $this->translate('Precio');?> kW</th>
    <th><?php echo $this->translate('Imputación');?> €</th>
    <th><?php echo $this->translate('K facturación');?></th>
    <th><?php echo $this->translate('Facturación');?> €</th>
    <th>% <?php echo $this->translate('gestión');?></th>
    <th><?php echo $this->translate('Importe gestión');?> €</th>
    <th><?php echo $this->translate('Superficie');?> m2</th>
    <th><?php echo $this->translate('Precio Exceso');?> €/m<sup>2</sup></th>
    <th><?php echo $this->translate('Ratio');?> W/m<sup>2</sup></th>
    <th><?php echo $this->translate('Disponibilidad Consumida');?> €</th>
    <th><?php echo $this->translate('Modalidad');?></th>
</tr>
</thead>
<tbody>
<?foreach($this->rows as $k => $v):?>
<tr>
    <td><?=$v['nombre']?></td>
    <td class="<?=$v['consumo_equipos_propios']['status'] ? '' : 'ui-state-error'?>"><?=$v['consumo_equipos_propios']['text']?></td>
    <td class="<?=$v['potencia']['status'] ? '' : 'ui-state-error'?>"><?=$v['potencia']['text']?></td>
    
    <td class="<?=$v['coeficiente_repercusion_aplicado']['status'] ? '' : 'ui-state-error'?>"><?=$v['coeficiente_repercusion_aplicado']['text']?></td>
    <td class="<?=$v['consumo_total']['status'] ? '' : 'ui-state-error'?>"><?=$v['consumo_total']['text']?></td>
    <td class="<?=$v['precio_aplicado']['status'] ? '' : 'ui-state-error'?>"><?=$v['precio_aplicado']['text']?></td>
    <td class="<?=$v['imputacion']['status'] ? '' : 'ui-state-error'?>"><?=$v['imputacion']['text']?></td>
    
    <td class="<?=$v['coeficiente_facturacion']['status'] ? '' : 'ui-state-error'?>"><?=$v['coeficiente_facturacion']['text']?></td>
    <td class="<?=$v['facturacion']['status'] ? '' : 'ui-state-error'?>"><?=$v['facturacion']['text']?></td>
    <td class="<?=$v['por_gestion']['status'] ? '' : 'ui-state-error'?>"><?=$v['por_gestion']['text']?></td>
    <td class="<?=$v['import_gestion']['status'] ? '' : 'ui-state-error'?>"><?=$v['import_gestion']['text']?></td>
     
    <td class="<?=$v['superficie']['status'] ? '' : 'ui-state-error'?>"><?=$v['superficie']['text']?></td>
    <td class="<?=$v['precio_exceso']['status'] ? '' : 'ui-state-error'?>"><?=$v['precio_exceso']['text']?></td>
    <td class="<?=$v['ratiowm2']['status'] ? '' : 'ui-state-error'?>"><?=$v['ratiowm2']['text']?></td>
    <td class="<?=$v['imputacion_exceso']['status'] ? '' : 'ui-state-error'?>"><?=$v['imputacion_exceso']['text']?></td>
    
    <?if($v['mod_disp']['text']==1):?>
    <td class="<?=$v['mod_disp']['status'] ? '' : 'ui-state-error'?>"><?php echo $this->translate('Antigua');?></td>
    <?elseif($v['mod_disp']['text']==2):?>
    <td class="<?=$v['mod_disp']['status'] ? '' : 'ui-state-error'?>"><?php echo $this->translate('Nueva');?></td>
    <?else:?>
    <td class="<?=$v['mod_disp']['status'] ? '' : 'ui-state-error'?>"></td>
    <?endif?>
    
</tr>
<?endforeach?>
</tbody>


</table>